package com.bwie.controller;

import com.bwie.pojo.TbBank;
import com.bwie.pojo.TbSroow;
import com.bwie.pojo.TbUser;
import com.bwie.service.TbUserService;
import com.bwie.utils.R;
import com.bwie.vo.LoginInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author:Max
 * @Date: 2024/8/9 19:00
 * @Description
 **/
@RestController
@RequestMapping("/user/index")
public class UserController {
    @Autowired
    TbUserService tbUserService;

    /**
     * 登录
     */
    @PostMapping("/login")
    public R login(@RequestBody LoginInfoVo loginInfoVo){
        return tbUserService.login(loginInfoVo);
    }


    /**
     * 我的资产列表
     */
    @PostMapping("/assetList/{userId}")
    public R assetList(@PathVariable Integer userId){
        return tbUserService.assetList(userId);
    }
    /**
     * 我的资产列表
     */
    @PostMapping("/getJiekuan/{userId}")
    public R getJiekuan(@PathVariable Integer userId){
        return tbUserService.getJiekuan(userId);
    }
    /**
     * 选择银行卡进行提现充值
     */
    @PostMapping("/getBrand")
    public R getBrand(@RequestBody TbBank tbBank){
        return tbUserService.getBrand(tbBank);
    }
    /**还款借款
     */
    @PostMapping("/getSroow")
    public R getSroow(@RequestBody TbSroow tbSroow){
        return tbUserService.getSroow(tbSroow);
    }
}
